home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-13 / amac44c.zip / RFR006.QM < prev    next >
Text File  |  1992-05-27  |  11KB  |  246 lines

  1. *                               rfr006.qm
  2. *    Macro To Replace "Period Space" With "Period Two Spaces", and Misc
  3. *                        Written By Tom Hogshead
  4. *                       [ See RFRMxx.QM For Use ]
  5. *                                 5/30/92
  6. *  Key        Subfile            Description
  7. * =====  ==============  ====================================================
  8. * @3                   --Rplc "Period Space" w/"Period Two Spc" In Block ( )
  9. * @4                   --Remove "Period Two Spaces" From Block
  10. *
  11. *                        Rplc "Period Space" w/"Period Two Spc" In Para,
  12. *                        Reformats Paragraph
  13. * @0                     ├─ Long Version,  Cannot Exceed Right Margin <BEST>
  14. * @1                     └─ Short Version, Can Exceed Right Margin
  15. *
  16. * @5                   --Remove "Period Two Spaces" from Paragraph,
  17. *                        Reformats Paragraph
  18. *--
  19. * @f3                  --Copy Char At Cursor To Line Below
  20. * @f4                    Insert Space At Cursor And Move Down To Next Line
  21. * @f5                    └─ (Alternate to @f4 Independent of Insert Status)
  22. * @f6                  --Deletes Char At The Cursor Move Down To Next Line
  23. * @f7                  --Move Block, Fill Old Block With Blanks
  24. *
  25. *         {e:\up\RFRM*}--Return To RFRMxx.QM
  26. *
  27. *-- eoi
  28.  
  29. * 
  30. * --------------------------------------------------------------------------
  31. * @(0) Replace "Period Space" with "Period Two Spaces" and Format Paragraph,
  32. *      Long Version Will Fit Qconfig.dat, Cannot Exceed Right Margin
  33. * --------------------------------------------------------------------------
  34. * See discussion of @1 below.
  35.  
  36. * The formatted paragraph will not exceed the right margin with @0
  37. * because no extra space is added for each period after formatting.  An
  38. * alternate shorter version is @1 which can exceed right margin.  Ascii
  39. * #173 cannot exist in file.
  40.  
  41. @0      macrobegin
  42.         setscreenoff
  43.         savesettings setsoundoff setautoindentmode
  44.         setwordwrapmode togglewordwrap
  45.         cursordown prevpara begline
  46.         unmarkblock markcharacter endpara markcharacter gotoblockbeg
  47.         find "." return "L" return
  48.      1: cursorright isendline jfalse 2 #173 2: repeatfind jtrue 1
  49.         gotoblockbeg
  50.         findreplace "." "  " return "." " " return "LN" return
  51.         findreplace "." " "  return "." #173 " "  return "LN" return
  52.         wrappara
  53.         findreplace #173 return " " return "GN" return
  54.         unmarkblock nextpara makectrofscreen restoresettings
  55. *
  56. * 90 bytes Fri  12-06-1991  01:17:05 (TH @0, to ALL #3/792)
  57.  
  58. * Remove asterisks, format to a right margin of 500, and use joinline
  59. * to fit on one line of qconfig.dat:
  60.  
  61. * @0 MacroBegin SetScreenOff SaveSettings SetSoundOff
  62. *    SetAutoIndentMode SetWordWrapMode ToggleWordWrap CursorDown
  63. *    PrevPara BegLine UnmarkBlock MarkCharacter EndPara
  64. *    MarkCharacter GotoBlockBeg Find "." Return "L" Return 1:
  65. *    CursorRight isEndLine JFalse 0: #173 0: RepeatFind
  66. *    JTrue 1: GotoBlockBeg FindReplace ".  " Return ". " Return
  67. *    "LN" Return FindReplace ". " Return "." #173 " " Return "LN"
  68. *    Return WrapPara FindReplace #173 Return " " Return "GN" Return
  69. *    UnmarkBlock NextPara MakeCtrOfScreen RestoreSettings
  70. *
  71. * 90 bytes Fri  12-06-1991  01:17:05 (TH @0, to ALL #3/792)
  72.  
  73. * 
  74. * --------------------------------------------------------------------------
  75. * @(1) Replace "Period Space" with "Period Two Spaces" and Format Paragraph
  76. *      Short Version To Fit Qconfig.dat, Can Exceed Right Margin
  77. * --------------------------------------------------------------------------
  78. * This macro will replace all 'period one spaces' a paragraph with
  79. * 'period two spaces' in the paragraph in which the cursor resides.  The
  80. * paragraph is also reformatted to the current right margin setting.
  81. * If the cursor is positioned between paragraphs, the previous
  82. * paragragh is processed.  The cursor ends on the first character of
  83. * the paragraph following the processed paragraph.  This macro will fit
  84. * on one line of qconfig.dat, and may be used to replace @b, wrappara,
  85. * in q.exe as configured.  Use @5 in rfr003.qm to remove all 'period
  86. * two spaces' in a paragraph.  This macro requires Qedit v2.15 and is
  87. * modification to a macro originally written by Tim Farley to do the
  88. * same thing in SemWare Conference 21, Message #3433, 1/18/91.
  89.  
  90. * The formatted paragraph may exceed the right margin with @1 because
  91. * one extra space is added for each period after formatting.  An
  92. * alternate longer version is @0 which will not exceed right margin but
  93. * will not fit on one line of qconfig.dat.
  94.  
  95. @1      macrobegin
  96.         setscreenoff savesettings setsoundoff
  97.         cursordown prevpara begline
  98.         unmarkblock markcharacter wrappara markcharacter gotoblockbeg
  99.         findreplace "." " "   return "." "  " return "LN" return
  100.         findreplace "." "   " return          return "LN" return           *|
  101.         gotoblockend unmarkblock nextpara makectrofscreen restoresettings
  102. *
  103. * 54 bytes Fri  01-18-1991  21:23:45 (TF #21/3433)
  104. * 60 bytes Mon  12-02-1991  14:25:32 (TH @1, mod to TF #21/3433 for v2.15)
  105. * 67 bytes Tue  12-03-1991  22:43:55 (TH @1, modified to not exceed rt mrgn)
  106. * 67 bytes Tue  12-03-1991  22:43:55 (TH @1, #24/635)
  107. * 62 bytes Thu  12-05-1991  15:32:25 (TH @1, added nextpara/makectrofscreen)
  108. * 60 bytes Thu  12-05-1991  18:38:02 (TH @1, removed jfalse END/added begline)
  109. * 60 bytes Thu  12-05-1991  18:38:02 (TH @1, to ALL #3/792)
  110. * 54 bytes Wed  12-11-1991  17:37:45 (TH @1, shortened |)
  111.  
  112. * 
  113. * ----------------------------------------------------------------------
  114. * @(3) Replace "Period Space" w/ "Period Space Space" In Block
  115. * ----------------------------------------------------------------------
  116. * This macro replaces 'period space'  with period two spaces" in a
  117. * marked block or a user selected block.  If a block is marked before
  118. * invoking this macro, either open or closed, it will be processed
  119. * without pause.  If no block is marked, the macro pauses for the user
  120. * to select the block end by cursoring to end of desired block and
  121. * pressing <enter>.  Requires QEdit v2.15.
  122.  
  123.     * Test. Test. Test
  124.     * Test. Test. Test
  125.  
  126. @3      macrobegin
  127. * --------------------------- Select Block ---------------------------*
  128.         gotoblockend jtrue A markline gotoblockend jtrue OK pause jump B
  129.      A: gotoblockbeg unmarkblock markline prevposition
  130.      B: markline
  131.     OK: setscreenoff
  132. * --------- Replace "Period Space' With 'Period Two Spaces' ---------*
  133.         gotoblockbeg begline
  134.         findreplace "." " "   return "." "  " return "N" return
  135.         findreplace "." "   " return          return "N" return
  136.       unmarkblock
  137. *
  138. * 56 bytes Mon  05-18-1992  17:36:42 (TH @3)
  139.  
  140. * 
  141. * ----------------------------------------------------------------------
  142. * @(4) Removes Period Two Spaces From Block
  143. * ----------------------------------------------------------------------
  144. * This macro removes 'period two spaces' from a marked block or a user
  145. * selected block.  If a block is marked before invoking this macro,
  146. * either open or closed, it will be processed without pause.  If no
  147. * block is marked, the macro pauses for the user to select the block
  148. * end by cursoring to end of desired block and pressing <enter>.
  149. * Requires QEdit v2.15.
  150.  
  151.  
  152.     * Test.  Test.  Test
  153.     * Test.  Test.  Test
  154.  
  155. @4      macrobegin
  156. * --------------------------- Select Block ---------------------------*
  157.         gotoblockend jtrue A markline gotoblockend jtrue OK pause jump B
  158.      A: gotoblockbeg unmarkblock markline prevposition
  159.      B: markline
  160.     OK: setscreenoff
  161. * -------------------- Remove 'period two spaces' --------------------*
  162.         gotoblockbeg begline
  163.         findreplace "." "  "   return "." " " return "LN" return
  164.         unmarkblock
  165. *
  166. * 44 bytes Mon  05-18-1992  17:34:08 (TH @4)
  167.  
  168. * 
  169. * ----------------------------------------------------------------------
  170. * @(5) Remove "Period Two Spaces" from Paragraph, Requires QEdit v2.15
  171. * ----------------------------------------------------------------------
  172. @5      macrobegin
  173.         setscreenoff savesettings setautoindentmode setsoundoff
  174.         cursordown prevpara begline
  175.         unmarkblock markcharacter endpara markcharacter gotoblockbeg
  176.         findreplace "." "  " return "." " " return "LN" return             *|
  177.         wrappara nextpara unmarkblock restoresettings
  178. *
  179. * 42 bytes Sun  12-08-1991  17:13:36 (TH @5, reformats after replacement)
  180. * 42 bytes Sun  12-08-1991  17:13:36 (TH @5, to ALL #3/792)
  181. * 38 bytes Wed  12-11-1991  22:49:00 (TH @5, shortened)
  182.  
  183.  
  184. * 
  185. * ----------------------------------------------------------------------
  186. * @(F3) Copy Character At Cursor To Line Below
  187. * ----------------------------------------------------------------------
  188.  
  189. @F3  macrobegin cursordown getprev cursorleft
  190. *
  191. * 7 bytes Sun  07-28-1991  16:45:37 (TH @3)
  192.  
  193. * 
  194. * ----------------------------------------------------------------------
  195. * @(F4) Insert Space At Cursor And Move Down To Next Line
  196. * ----------------------------------------------------------------------
  197. * Insert must be ON
  198.  
  199. @F4  macrobegin " " cursorleft cursordown
  200. *
  201. * 8 bytes Wed  09-05-1990  16:14:32
  202.  
  203. * 
  204. * ----------------------------------------------------------------------
  205. * @(f5) Insert Space At Cursor And Move Down To Next Line
  206. * ----------------------------------------------------------------------
  207. * The macro operates independent of Insert status.
  208.  
  209. @F5  macrobegin splitline cursorright joinline cursordown cursorleft
  210. *
  211. * 9 bytes Mon  07-29-1991  14:10:35 (TH @F5)
  212.  
  213. * 
  214. * ----------------------------------------------------------------------
  215. * @(F6) Deletes Char At Cursor And Move Down To Next Line
  216. * ----------------------------------------------------------------------
  217. @F6  macrobegin delch cursordown
  218. *
  219. * 6 bytes Tue  09-11-1990  09:40:22
  220.  
  221. * 
  222. * ------------------------------------------------
  223. * @(f7) Block move, fills old block with blanks
  224. * ------------------------------------------------
  225. * Mark block as column or character block, not a line block.  Move
  226. * cursor to location to move block to, press @f7,  and block is moved to
  227. * new location.  Old block is filled with spaces.
  228.  
  229. * This macro is a slight modification to a macro written by Tim Farley
  230. * of SemWare (message #665/REGDOS conf).  I changed "Paste" to PastOver"
  231. * so all surrounding text position remains unchanged, and removed the test
  232. * if block was cut to end macro.
  233.  
  234. @f7 MacroBegin
  235.         GotoBlockBeg                    * Get to block begin
  236.         JFalse END                      * If no block, end macro
  237.         Cut                             *ELSE Cut block to scrap
  238.         Paste                           * And paste it back where it was
  239.         PrevPosition                    * Move where new block will be
  240.         FillBlock " " Return            * Fill old block with blanks
  241.         Pasteover                       * Paste old block to new loctn.
  242.  END:                                   *
  243. *
  244. * 16 bytes Thu  02-28-1991  15:14:17
  245.  
  246.